{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e9da6b17",
   "metadata": {},
   "source": [
    "## 本周学习内容\n",
    "\n",
    "### 1.课本项目直接运行\n",
    "\n",
    "### 2.认识变量\n",
    "\n",
    "### 3.赋值的概念\n",
    "\n",
    "### 4.python 语言的基本数据结构:（文本，数值）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "d7fff6b5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "26"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 回顾上周 模块.tab\n",
    "import datetime\n",
    "datetime.datetime.today().minute"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "37c3048b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "This minute seems a little odd.\n"
     ]
    }
   ],
   "source": [
    "# 1.课本项目直接运行\n",
    "# 先找到模块，然后从模块中调用一个方法；from模块名字import模块方法\n",
    "\n",
    "from datetime import datetime\n",
    "\n",
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19,\n",
    "             21,23,25,27,29,31,33,35,37,39,\n",
    "             41,43,45,47,49,51,53,55,57,59]\n",
    "\n",
    "right_this_minute = datetime.today().minute # 一直变化的当前时间的分钟数\n",
    "\n",
    "if right_this_minute in odds:\n",
    "    print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "    print(\"Not an odd minute.\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "5a273850",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "This minute seems a little odd.\n"
     ]
    }
   ],
   "source": [
    "#1.课本项目直接运行\n",
    "#先找到模块，然后从模块中调用一个方法：from 模块名字 import 模块方法\n",
    "from datetime import datetime\n",
    " \n",
    "odds = [  1, 3,  5,  7,  9, 11,13,15,17,19,\n",
    "             21,23,25,27,29,31,33,35,37,39,\n",
    "             41,43,45,47,49,51,53,55,57,59]    \n",
    "\n",
    "right_this_minute = datetime.today().minute\n",
    " \n",
    "if right_this_minute in odds:\n",
    "     print(\"This minute seems a little odd.\")\n",
    "else:\n",
    "     print(\"Not an odd minute.\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ab397c28",
   "metadata": {},
   "source": [
    "###### 1.odds =(等号为赋值)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b1b0f9b6",
   "metadata": {},
   "source": [
    ">### 变量的定义\n",
    ">>*  **变量**用于存储要在计算机程序中引用和操作的信息。它们还提供了一种用描述性名称标记数据的方法，以便读者和我们自己能够更清楚地理解我们的程序。将变量看作包含信息的容器是有帮助的。它们的唯一目的是在内存中标记和存储数据。然后可以在整个程序中使用这些数据。\n",
    "\n",
    ">2. 变量名称的规范\n",
    ">> 1. 变量名称只可以用数字，字母和下划线来定义名称.\n",
    ">> 2. 数字不可以作为变量名的第一个字符(stu100).\n",
    ">> 3. 内部(开发团队)已经使用过的名称不可以作为变量名.\n",
    ">> 4. 如果你实在想定义一个已经被用过的名字；global_bingmei\\ptine_bingmei.\n",
    "例如:\n",
    "\n",
    "['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda','not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'with', 'yield']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "fddcea0e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Jack\n"
     ]
    }
   ],
   "source": [
    "# 变量实践\n",
    "name =\"Jack\"\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "685e77bc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CenBingmei\n"
     ]
    }
   ],
   "source": [
    "# 变量实践2\n",
    "first_name = \"Cen\"\n",
    "last_name = \"Bingmei\"\n",
    "name =first_name+''+last_name\n",
    "print(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "2f75d259",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Alex Alex\n",
      "LI,Alex Alex\n"
     ]
    }
   ],
   "source": [
    "# 变量实践3\n",
    "name_01 = \"Alex\"\n",
    "name_02 = name_01\n",
    "\n",
    "print(name_01,name_02)\n",
    "\n",
    "name_01 = \"LI,Alex\"\n",
    "\n",
    "print(name_01,name_02)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "6db5576b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'str'>\n"
     ]
    }
   ],
   "source": [
    "print(type(name_01))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "94bb84c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 以上结果的原因；\n",
    "# python是一门解释性语言，是一行一行的执行的，没有特定的要求，是不会重复运行上一行代码的"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "488fd8af",
   "metadata": {},
   "source": [
    ">1. 阅读字符串概念\n",
    ">>1. 练习 [字符串](https://docs.python.org/3/tutorial/introduction.html#strings)\n",
    ">>2. 练习[字符串方法](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)\n",
    ">2. 阅读数值概念\n",
    ">>1. [数值](https://docs.python.org/3/tutorial/introduction.html#numbers)\n",
    ">>2. [数值方法](https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "55cb43ac",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (<ipython-input-33-1911ddb2d9d3>, line 2)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-33-1911ddb2d9d3>\"\u001b[1;36m, line \u001b[1;32m2\u001b[0m\n\u001b[1;33m    phrase =’doesn’t’# 错误的使用\u001b[0m\n\u001b[1;37m                    ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "# invalid syntax 语法错误\n",
    "phrase =’doesn’t’# 错误的使用\n",
    "phrase"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "b0922d65",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"doesn't\""
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"doesn’t\" # 解决方案1\n",
    "'doesn\\'t' #解决方案2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b1493038",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "<div class=\"lin-header \">\n",
      "\t\t<div class=\"lin-head clearfix\">\n",
      "\t\t\t<h1 class=\"lin-topl\">\n",
      "\t\t\t\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\n",
      "\t\t\t\t\t<img src=\"images/logo.png\">\n",
      "\t\t\t\t</a>\n",
      "\t\t\t</h1>\n",
      "\t\t\t<div class=\"lin-topr\">\n",
      "\t\t\t\t<div class=\"lin-youxiang\">\n",
      "\t\t\t\t\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\n",
      "\t\t\t\t\t<a href=\"xcyx/index.htm\">校长邮箱</a>\n",
      "\t\t\t\t\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\n",
      "\t\t\t\t\t\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\n",
      "\t\t\t\t\t\t\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\n",
      "\t\t\t\t</div>\n",
      "\t\t\t\t<div class=\"lin-ser lin-serhide\">\n",
      "\t\t\t\t\t<div class=\"serbox\">\n",
      "\t\t\t\t\t\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\n",
      "\t\t\t\t\t\t\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \n",
      "\t\t\t\t\t\t\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\n",
      "\t\t\t\t\t\t\t<a href=\"javascript:;\" id=\"search_btn\">\n",
      "\t\t\t\t\t\t\t</a>\n",
      "\t\t\t\t\t\t</form>\t\n",
      "\t\t\t\t\t\t<script type=\"text/javascript\">\n",
      "\t\t\t\t\t\t\t$(\"#search_btn\").click(function(){\n",
      "\t\t\t\t\t\t\t\tvar keyword=$(\"#keyword\").val();\n",
      "\t\t\t\t\t\t\t\tif(keyword==''){\n",
      "\t\t\t\t\t\t\t\t\talert('* 请输入搜索关键词 !');\n",
      "\t\t\t\t\t\t\t\t\t$(\"#keyword\").focus();\n",
      "\t\t\t\t\t\t\t\t\treturn false;\n",
      "\t\t\t\t\t\t\t\t}else{\n",
      "\t\t\t\t\t\t\t\t\t$(\"#search_form\").submit();\n",
      "\t\t\t\t\t\t\t\t}\n",
      "\t\t\t\t\t\t\t})\n",
      "\t\t\t\t\t\t</script>\n",
      "\t\t\t\t\t</div>\n",
      "\t\t\t\t\t\n",
      "\t\t\t\t</div>\n",
      "\t\t\t</div>\n",
      "\t\t</div>\n",
      "\t</div>\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# 字符串 三引号 \"\"\"  \"\"\"  或者 '''   '''\n",
    "# 三引号 可以存储较为复杂的文本数据（例如可以存 其他语言的 数据）\n",
    "广州南方学院官网_HTML = \"\"\"\n",
    "<div class=\"lin-header \">\n",
    "\t\t<div class=\"lin-head clearfix\">\n",
    "\t\t\t<h1 class=\"lin-topl\">\n",
    "\t\t\t\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\n",
    "\t\t\t\t\t<img src=\"images/logo.png\">\n",
    "\t\t\t\t</a>\n",
    "\t\t\t</h1>\n",
    "\t\t\t<div class=\"lin-topr\">\n",
    "\t\t\t\t<div class=\"lin-youxiang\">\n",
    "\t\t\t\t\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\n",
    "\t\t\t\t\t<a href=\"xcyx/index.htm\">校长邮箱</a>\n",
    "\t\t\t\t\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\n",
    "\t\t\t\t\t\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\n",
    "\t\t\t\t\t\t\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\n",
    "\t\t\t\t</div>\n",
    "\t\t\t\t<div class=\"lin-ser lin-serhide\">\n",
    "\t\t\t\t\t<div class=\"serbox\">\n",
    "\t\t\t\t\t\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\n",
    "\t\t\t\t\t\t\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \n",
    "\t\t\t\t\t\t\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\n",
    "\t\t\t\t\t\t\t<a href=\"javascript:;\" id=\"search_btn\">\n",
    "\t\t\t\t\t\t\t</a>\n",
    "\t\t\t\t\t\t</form>\t\n",
    "\t\t\t\t\t\t<script type=\"text/javascript\">\n",
    "\t\t\t\t\t\t\t$(\"#search_btn\").click(function(){\n",
    "\t\t\t\t\t\t\t\tvar keyword=$(\"#keyword\").val();\n",
    "\t\t\t\t\t\t\t\tif(keyword==''){\n",
    "\t\t\t\t\t\t\t\t\talert('* 请输入搜索关键词 !');\n",
    "\t\t\t\t\t\t\t\t\t$(\"#keyword\").focus();\n",
    "\t\t\t\t\t\t\t\t\treturn false;\n",
    "\t\t\t\t\t\t\t\t}else{\n",
    "\t\t\t\t\t\t\t\t\t$(\"#search_form\").submit();\n",
    "\t\t\t\t\t\t\t\t}\n",
    "\t\t\t\t\t\t\t})\n",
    "\t\t\t\t\t\t</script>\n",
    "\t\t\t\t\t</div>\n",
    "\t\t\t\t\t\n",
    "\t\t\t\t</div>\n",
    "\t\t\t</div>\n",
    "\t\t</div>\n",
    "\t</div>\n",
    "\"\"\"\n",
    "print(广州南方学院官网_HTML)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "e73921d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n<div class=\"lin-header \">\\n\\t\\t<div class=\"lin-head clearfix\">\\n\\t\\t\\t<h1 class=\"lin-topl\">\\n\\t\\t\\t\\t<a href=\"index.htm\" target=\"_blank\" title=\"广州南方学院\">\\n\\t\\t\\t\\t\\t<img src=\"images/logo.png\">\\n\\t\\t\\t\\t</a>\\n\\t\\t\\t</h1>\\n\\t\\t\\t<div class=\"lin-topr\">\\n\\t\\t\\t\\t<div class=\"lin-youxiang\">\\n\\t\\t\\t\\t\\t<!--<a href=\"http://oa.nfu.edu.cn/\" target=\"_blank\">办公系统</a>-->\\n\\t\\t\\t\\t\\t<a href=\"xcyx/index.htm\">校长邮箱</a>\\n\\t\\t\\t\\t\\t<a href=\"http://en.nfu.edu.cn/\">English Version</a>\\n\\t\\t\\t\\t\\t\\t<!-- <a href=\"https://mail.nfu.edu.cn/\" target=\"_blank\">邮箱登录</a>\\n\\t\\t\\t\\t\\t\\t\\t<a href=\"mailto:nfcsysuyz@126.com\" target=\"_blank\" title=\"nfcsysuyz@126.com\" >院长信箱</a> -->\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t<div class=\"lin-ser lin-serhide\">\\n\\t\\t\\t\\t\\t<div class=\"serbox\">\\n\\t\\t\\t\\t\\t\\t<form action=\"/cms/web/search/index.jsp\" method=\"get\" id=\"search_form\">\\n\\t\\t\\t\\t\\t\\t\\t<input name=\"siteID\" value=\"bbef6bf928be491d9180b44993df0ac9\" type =\"hidden\"> \\n\\t\\t\\t\\t\\t\\t\\t<input type=\"text\" name=\"query\" id=\"keyword\" placeholder=\"搜索\">\\n\\t\\t\\t\\t\\t\\t\\t<a href=\"javascript:;\" id=\"search_btn\">\\n\\t\\t\\t\\t\\t\\t\\t</a>\\n\\t\\t\\t\\t\\t\\t</form>\\t\\n\\t\\t\\t\\t\\t\\t<script type=\"text/javascript\">\\n\\t\\t\\t\\t\\t\\t\\t$(\"#search_btn\").click(function(){\\n\\t\\t\\t\\t\\t\\t\\t\\tvar keyword=$(\"#keyword\").val();\\n\\t\\t\\t\\t\\t\\t\\t\\tif(keyword==\\'\\'){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\talert(\\'* 请输入搜索关键词 !\\');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$(\"#keyword\").focus();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$(\"#search_form\").submit();\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t})\\n\\t\\t\\t\\t\\t\\t</script>\\n\\t\\t\\t\\t\\t</div>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t</div>\\n\\t\\t\\t</div>\\n\\t\\t</div>\\n\\t</div>\\n'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "广州南方学院官网_HTML"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "03b457a6",
   "metadata": {},
   "source": [
    "* 字符串可以用+运算符连接（粘合在一起），并用 重复"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "5938036c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CenBingmei\n"
     ]
    }
   ],
   "source": [
    "# 字符串的拼接\n",
    "print(\"Cen\"+\"Bingmei\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "561bbdeb",
   "metadata": {},
   "source": [
    "* 字符串可以被引索（下标）\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "17f55c1a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'interactive-media-production'"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name = \"interactive-media-production\"\n",
    "course_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "9f643bce",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[12]+course_name[13]+course_name[14]+course_name[15]+course_name[16]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "b0cd8672",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'media'"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[12:17]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "c4bbd948",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'cti'"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "course_name[-5:-2]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5c3db80f",
   "metadata": {},
   "source": [
    "* 切片（slice）的性质；\n",
    "> 1. [值1:值2] 值1<值2\n",
    "> 2. [值1：值2]值2是取不到的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "aa70fa80",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "300"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "100+200"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "79cbe42d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'int'>\n"
     ]
    }
   ],
   "source": [
    "print(type(2021))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "599a5c82",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'float'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3.1415926))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "54fecd9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'complex'>\n"
     ]
    }
   ],
   "source": [
    "print(type(3+2j))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "fb5e3ebe",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = \"50\"  # 引号括起来的不是数值，哪怕它里面是数值\n",
    "b = 40"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "79383471",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "can only concatenate str (not \"int\") to str",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-19-bd58363a63fc>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0ma\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mb\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: can only concatenate str (not \"int\") to str"
     ]
    }
   ],
   "source": [
    "a + b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4616b2a7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "weekly=time.strftime(\"%w\")\n",
    "print(weekly)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "06334a96",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "又是愉快的周末！\n"
     ]
    }
   ],
   "source": [
    "weekly\n",
    "周一至周五的课=\"下午16:10-17:35--大学英语，好开心呀！18:45-20:55--思修，好困呀！\"\n",
    "if weekly == 1:\n",
    "    print(\"下午16:10-17:35--大学英语，好开心呀！18:45-20:55--思修，好困呀！\")\n",
    "elif weekly == 2:\n",
    "    print(\"14:30-16:50--交互产品开发,又可以设计图稿了！\")\n",
    "elif weekly == 3:\n",
    "    print(\"10:35-12:00--排球课，可以运动啦！\")\n",
    "elif weekly == 4:\n",
    "    print(\"18:45-21:45--又是敲代码的一天！\")\n",
    "elif weekly == 5:\n",
    "    print(\"10:35-12:00--最后一节英语课啦！上完就放假啦啦啦！\")\n",
    "else:\n",
    "    print(\"又是愉快的周末！\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
